package cn.bonoon.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import cn.bonoon.kernel.support.entities.AbstractPersistable;
import cn.bonoon.kernel.support.entities.EntityDeletable;

@Entity
@Table(name = "t_recycle")
public class RecycleEntity extends AbstractPersistable implements EntityDeletable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -489930374182970188L;

	@Column(name = "C_NAME")
	private String name;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "C_CREATEAT", nullable = false)
	private Date createAt;
	
	@Column(name = "C_ENTITYNAME")
	private String entityName;
	
	@Column(name = "C_ENTITYID")
	private Long entityId;
	
	@Column(name = "C_REMARK", length = 600)
	private String remark;
	
	/**
	 * 删除回收站记录，删除后该对象仍为逻辑删除，但不会在回收站里有记录
	 */
	@Column(name = "C_DELETED")
	private boolean deleted;
	
	@Enumerated
	@Column(name = "C_EXCETIONSTATUS")
	private RecycleExceptionStatus exceptionStatus;
	
	@Column(name = "C_CREATORID")
	private Long creatorId;
	
	@Column(name = "C_CREATORNAME")
	private String creatorName;
	
	@Column(name = "C_OWNERID")
	private Long ownerId;

	public RecycleExceptionStatus getExceptionStatus() {
		return exceptionStatus;
	}

	public void setExceptionStatus(RecycleExceptionStatus exceptionStatus) {
		this.exceptionStatus = exceptionStatus;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}

	public String getEntityName() {
		return entityName;
	}

	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}

	public Long getEntityId() {
		return entityId;
	}

	public void setEntityId(Long entityId) {
		this.entityId = entityId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public String getCreatorName() {
		return creatorName;
	}

	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}

	public Long getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
	}

}
